package com.example.drools.controller;

import com.example.drools.dto.RecommendRequest;
import com.example.drools.model.Recommendation;
import com.example.drools.service.RecommendationService;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping("/api")
public class RecommendationController {

    private final RecommendationService service;

    public RecommendationController(RecommendationService service) {
        this.service = service;
    }

    @PostMapping("/recommend")
    public List<Recommendation> recommend(@RequestBody RecommendRequest request) {
        return service.recommend(request);
    }
}